import 'package:flutter/material.dart';

import 'common/app_refresh_config.dart';
import 'router.dart';

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // 做一些全局配置
    return AppRefreshConfig(
      child: MaterialApp.router(
        title: '个人项目',
        theme: ThemeData(
            // 设置上下滑动的颜色,要是想完全去掉就用NoScrollBehaviorWidget
            // 但是每个滑动控件都得去包裹，前期可以先这么做
            highlightColor: Colors.transparent,
            splashColor: Colors.transparent,
            appBarTheme: AppBarTheme(
              elevation: 0,
              centerTitle: true,
              color: Colors.white,
            )),
        routerConfig: appRouter,
      ),
    );
  }
}
